On Wed, May 20, 2015 at 10:38 AM, Niels Charlier <niels@anonymised.com> wrote:
Hello,
While doing a pull request on the geofence-server rest api, I had a
question. This rest api is made in the spring rest api, unlike the rest
of geoserver which uses restful. Jody suggested we might wish to
(gradually) move towards that system, and I prefer it as well, It is
very easy to read and write.
Not against it, but since it will create a ton of "tech debt", we need a
proposal
and all devs to agree that from now all new restlets are going to be written
with Spring.
Also, how do you intend to keep the rest-config module working with
a mix of the two systems, can actually gradually migrate, or would
we have to rewrite all restconfig in a single shot?
Additionally to that, I have also made a rest api for user/groups and
roles in the same fashion. The spring classes only rely on one
additional dependency above the normal spring stuff, and that is
spring-oxm (handles the xml to object conversions).
GeoServer heavily relies on XStream for that task, is this
another technology you're proposing as a replacement for the future?
I see that spring-oxm can use XStream, but does not look like it's the
recommended way, can you clarify?
Now the user and role stuff doesn't really belong in the geofence-server
module, because people might want to use it if they are using the
default security subsystem and not geofence. So currently these are the
options:
(0) Leave the user/role spring rest api only for geofence-server users;
(1) My first proposal was to create a new community module rest-sec with
all the common security rest api.
However, in the meantime Christian is making a rest api for security
rules in the standard subsystem, and is doing this the traditional way
with restful and adding it to the existing restconfig module, so that
seems kind of off the table;
(2) My other proposal was to create a new module restconfig-ng that will
hold all future spring rest api stuff, keeping the two systems separate
as (if) we gradually move from one to the other.
(3) Simply add the user/role rest api classes, including the oxm
dependency, to the existing restconfig module as well. That would make
that module a mixture of the two systems.
I'm not particularly thrilled by either options... yes, I agreed with using
spring rest,
but that was for the geofence rules api, which is completely separate,
I did not know you were also working on a user/role one, nor did you
mention spring-ox.
As long as we can keep the new rest api separate I don't see a problem,
but I doubt you'll get any traction with a separate restconfig-ng module,
looks
like a big-bang rewrite is needed to make it actually replace the core
rest-config,
as I believe we need to keep everything config related in a single url tree
(the resources
are interconnected with each other), like, if we add a new type of
ResourceInfo (one based
on processes for example), we cannot really publish it in a different rest
url tree... it seems
to me only rest api that is not related to service and data config could be
moved to a
restconfig-ng, which would make it no config at all...
But maybe you though it out in detail and see a way to make it work, so
please elaborate
Cheers
Andrea
--
Meet us at the INSPIRE Conference in Lisbon 25-29 May 2015! Visit
http://goo.gl/WHKDXT for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------------------------------------------------