Comments (4)
Could you please explain how / why the problems you describe will be solved with Spring?
from fasten.
Could you please explain how / why the problems you describe will be solved with Spring?
Sure, sorry for my brevity.
- First things first: the Spring DI. Spring has some dedicated annotations like
@Autowired
and@Service
that already allowed me to have a fully-functional CDI system. This simplifies unit testing a lot #87. - I already noticed that this Spring version of the REST API doesn't suffer from most of the timeouts we had before. I think this is due to Spring's embedded Tomcat Servlet container. I didn't manage to find out why Jetty caused timeouts, so a very dumb solution would be to just get rid of it.
- For concurrency, I think this is going to be handled by Spring & Tomcat. I didn't find any simple solution for Jetty rather than spawning threads manually #93 (comment). I think this could be achieved with a simple
server.tomcat.max-threads=400
with the Spring's embedded Tomcat. There seem to be lots of other tweaks as well for Spring.
from fasten.
@ilyagrishkov @MihhailSokolov do I have to keep Main.java and RestAPIPlugin.java that implements the PF4J Plugin
interface and DBConnector
?
It's a bit complicated to launch Spring through such classes.
I'd just use:
@SpringBootApplication
public class RestApplication {
public static void main(String[] args) {
SpringApplication.run(RestApplication.class, args);
}
}
With a Spring @Component
that connects to the KnowledgeBase at the beginning:
@Component
public class KnowledgeBaseConnector {
@PostConstruct
public void connectToKnowledgeBase() { /* ... */ }
}
So instead of launching it with mvn exec:java
it would be: mvn spring-boot:run
.
So technically, not a PF4J plugin anymore: is it ok?
from fasten.
Done in #123.
from fasten.
Related Issues (20)
- Populating pypi.coords.txt with more entries. HOT 4
- Edit API endpoints for PyPi projects
- [Debian] package_versions table filled with more entries with the same package version. HOT 4
- How to increase the log verbosity for a kafka plugin. HOT 1
- Is the heartbeat call in FASTEN server still needed? HOT 2
- Kafka plugins crash when either a priority or a normal topics is missing HOT 1
- The "Build and push the license feeder/detector" workflows get triggered on *every* push HOT 4
- The REST API stops working if `PSQLException` happens. HOT 9
- /mvn/packages/{pkg}/{pkg_ver}/rcg returns HTTP code 500 HOT 8
- MavenResolverIO assumes dep_graph directory is present and crashes if it isn't HOT 4
- REST APIs Endpoints for licensing. HOT 7
- Java REST API crashes due to the out of memory exception HOT 2
- Maven REST API resolve endpoints timeout HOT 3
- Recent changes to DB logic in server and plugins have broken the Quality Analyzer plugin HOT 5
- QualityAnalyzer plugin matches too many callables in some Python cases HOT 1
- Java Metadata Plugin has stopped processing records HOT 5
- Add Debian and PyPI resolver to deployment schema
- List for python packages known by FASTEN still static?
- PyPI query used for ingestion no longer contains releases info (breaking pypi-filter) HOT 3
- REST API: package/version endpoint does not work for Debian HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fasten.