Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example: Short Circuit #71

Closed
tkohegyi opened this issue Jan 28, 2016 · 3 comments
Closed

Example: Short Circuit #71

tkohegyi opened this issue Jan 28, 2016 · 3 comments
Assignees

Comments

@tkohegyi
Copy link
Contributor

ShortCircuit - in case a request has happened before, and the answer is known, use the previously recorded answer (so stub it), otherwise act as proxy and record the answer - next time can be used.

@tkohegyi tkohegyi changed the title Example: ShortCircuit Example: Short Circuit Jan 28, 2016
@tkohegyi
Copy link
Contributor Author

condition: checks if specific request was cached already properly, if yes: stub it, if not, caches the request and notify response interceptor to cache the response.
response interceptor: when response arrived, checks if need to be cached (condition will set it), if yes, cache it

@tkohegyi tkohegyi self-assigned this Feb 21, 2016
tkohegyi added a commit that referenced this issue Feb 21, 2016
…d to specify response headers for a stub response - so a relatively big change was introduced to open the possibility of manipulating stub response headers - and many other things - by publishing HttpServletResponse object for template formatters.

Also the WilmaSequence object is moved into WilmaHttpResponse object, so the interface of the TeamplateFormatter is changed - this is a non-backward compatible change in order to make stub response generation/formatting more flexible as it was before.

In addition, stub configuration upload become more resistant against uploading classes those don't have the proper interfaces implemented.
tkohegyi added a commit that referenced this issue Feb 22, 2016
…aders: HeaderFormatter.class

also speed up the Response Generator of the ShortCircuit example
tkohegyi added a commit that referenced this issue Feb 24, 2016
further improvement possibilities:
- add service to see the list and clear cache
- Readme.md on how it works

By the way there was a change in Wilma too, to ensure that response formatters can set the response content type and response code (regardless what it in the response descriptor).
@tkohegyi
Copy link
Contributor Author

further improvement possibilities:

  • add service to see the list and clear cache
  • Readme.md on how it works
  • by using the service, save responses as files, and a config xml, that can be used offline (stub for a service)

tkohegyi added a commit that referenced this issue Mar 9, 2016
…al service feature.

Seems the the external service is working, now need to add proper service to the Short Circuit part.
tkohegyi added a commit that referenced this issue Mar 10, 2016
…l services to Wilma. It works. (Need some docs update however.)

Also further work on #71, but its external service part is not-yet finalized.
tkohegyi added a commit that referenced this issue Mar 13, 2016
- for #77, both /services and and /services/ gets the actual service map
- for #71, prepared to handle several commands (not finished)
tkohegyi added a commit that referenced this issue Mar 13, 2016
- fix problem in previous commit, @ service calls
- implement clean up command @ short circuit example
tkohegyi added a commit that referenced this issue Mar 15, 2016
#71 delete short circuit map prepared
#77 open the possibility of using PUT, DELETE methods too (in addition to the GET and PUSH)
tkohegyi added a commit that referenced this issue Mar 20, 2016
http://localhost:1234/config/public/services/ShortCircuitInterceptor/circuits?folder=FolderName works. Next is to load this (or any other saved map) back.
tkohegyi added a commit that referenced this issue Mar 20, 2016
- minor restructure of save map part
- start implementation of the load map part
@tkohegyi
Copy link
Contributor Author

This commit actually belongs here d1ff29b

tkohegyi added a commit that referenced this issue Apr 24, 2016
- in connection to #71
- there was a Wilma external service update too: <servicename>/* is accepted by Wilma, so the external service is called with such paths
tkohegyi added a commit that referenced this issue Apr 27, 2016
- updates for #71, like: readme update, cache list update, fix hashCode generation, add delete of single cache entry
tkohegyi added a commit that referenced this issue May 7, 2016
…s partially fixed, load cache is still not good
tkohegyi added a commit that referenced this issue May 8, 2016
only a few content-type is allowed (html, json, plain-text) simpler and
more reliable - still need to work on save and load cache
tkohegyi added a commit that referenced this issue May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant