Repository login performance using Apache Jackrabbit - jackrabbit

Session session = repository.login(new SimpleCredentials("username", "password".toCharArray()));
I am using Apache Jackrabbit in embdeed mode. using the 'default' out of the box set up, it takes about 10 seconds just to login to a new repository. is there a way to speed this up? Perhaps settings in the registory.xml i need to modify to hopefully get it down to 1 second or less time it take to login.
Thanks.

Related

HCW - hybrid configuration wizard modern - InternalUrl_Duplicate

Unable to get through the Hybrid Configuration Wizard in Modern mode. This is necessary because we want to migrate mailboxes. Classic mode works.
It knows that there is a Hybrid Agent, but I can't successfully install with either path of using existing or adding a new one. In Azure there is an App Proxy registration which appears to have the incorrect IP for the route to on-prem. This was due to a misconfiguration of our outgoing firewall. However after the firewall configuration was fixed, the App Proxy still has the old return IP, and there is no way in Azure to remove this record.
I've removed the app proxy components on the server, and let the HCW install again but this record is not updated or removed. Also have gone through 'Classic' path which according to community posts is supposed to remove the App Proxy record, but it doesn't.
According to what I've read, if the record is inactive for 10 days, it will be removed, but I'd rather resolve this without waiting for 10 days.
I've tried patching the record using Graph but it doesn't work.
2022.01.31 22:09:59.707 10333 [Client=UX, fn=SendAsync, Thread=15] FINISH Time=2170.2ms Results=BadRequest {"error":{"code":"InternalUrl_Duplicate","message":"Internal url 'https://LOCALFQDNSERVER/' is invalid since it is already in use","innerError":{"date":"2022-01-31T22:09:58","request-id":"d5c4dfe0-096d-4382-9da0-9559f45e0217","client-request-id":"d5c4dfe0-096d-4382-9da0-9559f45e0217"}}}

Is there a way to force Solr to read the indexes every X minutes?

I am trying to use Solr to read and search trough the indexes provided by an another application. These indexes are copied to a NAS every 15 minutes.
Is there a way to force Solr to re-read the indexes every 15 minutes ? Is there a way to set a searcher to expire or to be reloaded using maybe a CRON expression?
I am aware that I can reload the core... but I'm asking if maybe is there an another way...
Thanks.
If you are able to write some CRON expression it could be done in that way:
Solr have an endpoint for reloading a core, so all you need is to hit this URI every X minutes.
Load a new core from the same configuration as an existing registered
core. While the "new" core is initalizing, the "old" one will continue
to accept requests. Once it has finished, all new request will go to
the "new" core, and the "old" core will be unloaded.
http://localhost:8983/solr/admin/cores?action=RELOAD&core=core0
Yes you can use a CRON expression.
DataImportHandler will allow you to update your Solr index based on your NAS-indexes.
Look for the "delta-import" command "for incremental imports and change detection":
http://<host>:<port>/solr/<collection_name>/dataimport?command=delta-import
Programmatically using a Client API like SolrJ:
CommonsHttpSolrServer server = new CommonsHttpSolrServer("http://localhost:8983/solr/<collection_name>");
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("command", "delta-import");
QueryRequest request = new QueryRequest(params);
request.setPath("/dataimport");
server.request(request);

Best approach for real time process information / Server + JS Client

I have a C# Web API project on server side and on front-end I have ExtJS 4.2.1 (Javascript framework client).
There is a section in my app where I request to start a long running process (about 5 minutes) and I want to show the user the status of the process being executed.
Basically, the process will run a special calculation for every employee in the database (about 800), so I want to let the user know which Employee is being processed in that moment.
So I was thinking in two ways of doing this, and maybe I don't know if having both is ok.
Use SignalR to show the information of the process in Real Time.
Write to a database table all the process log (every employee that its being processed).
If I use the first approach, if the user close the browser he will loose all the information about the process and if he log into the app again he will only see the actual status.
If I use the second approach, if he log into the app again he could see all the information, and using maybe a timer on client side the data could be refreshed every 5 seconds.
Does anyone have implemented something like this? Any advice is appreciated.
You should use a combination of the two. When you have calculated a employee save the state to the database and publish the change on a service bus.
Let SignalR pick these messages up and forward them to the client. This way the user will see old state when he connects and new state then they arrive with SignalR. I have created a Event aggregator proxy that makes this very easy.
https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy/wiki
Follow the wiki to set it up, here is a demo project
https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy/tree/master/SignalR.EventAggregatorProxy.Demo.MVC4
Live demo
http://malmgrens.org/Signalr/

Scheduled Task to kill specific internet explorer tab

Is it possible to schedule a task that will kill a specific internet tab every 15 minutes?
Our operatives all access a reports dashboard, but due to the number of licenses we keep finding ourselves being unable to log on as people leave their screen open despite not using it.
If there was a scheduled task that ran every 15 minutes, perhaps that just kicked off a batch file that looked for an internet tab that's always called 'Dashboard' then it would kill it, that would be great.
Can anyone help please?
Thanks
I don't think this can be done easily if it can be done at all.
Does the application you use - Dashboard? - have a setting to handle a session after some time of inactivity as being closed like when closing the page in the browser or terminate the browser?
It would be better to control the session and license management from server side instead of from client side.
Do you use OpenStack Dashboard (Horizon) as I found the page Horizon does not implement a browser session timeout with the information that there is now such a feature.

Apache Sticky sessions

I have configured a sticky session set up with a load balancer (Apache) and three app nodes running Jboss 4.2.2 .
the load balancer uses mod_jk and settings as mentioned in the tutorial here.
http://community.jboss.org/wiki/UsingModjk12WithJBoss;jsessionid=1569CBFB7C3096C59C977CD3F7159A32
I have the jumRoute set as node1 ,node2 and node3 for the three nodes and my workerlist property for load balancer is set as
node1,node2,node3
The tutorial has been followed till the last point but I did not configure the useJK parameters under.the value is still set to false.
The sticky sessions are holding up but I seem to loose session and get this error in my mod_jk log file
[error] ajp_get_reply::jk_ajp_common.c (1926): (node1) Timeout with waiting reply from tomcat. Tomcat is down, stopped or network problems (errno=110)
I personally checked the user logged in on node1 and then moved to node2.
Does Apache redirect to another node when it fails to get reply from node1, How does useJk help in this situation.
---edit 01---
I changed the UseJK value to true but still few users still experience sudden log out which I know due to change in the server node catering the users request.
I also wanted to know whether traffic on the nodes has any affect on sticky session and how to counter it.( I am experiencing high load on all the servers for a few days)
----edit 02 ----
I would also like to know about controlling the number of connections per worker.
controlling the number of ajp connector/connections.
relation between the number of connections of apache load balancer and number of
ajp connections in JBoss worker nodes.
what would be the best configuration between Apache 2.2.3 and JBoss 4.2.2 worker nodes with Tomcat 5.5 connectors.
---- edit03-----
http://community.jboss.org/wiki/OptimalModjk12Configuration
using the above article i just wanted to know the best values for Apache
MaxClients
ThreadPerChild
I found the following note in this article interesting. I haven't tried this, but perhaps could be useful for someone experiencing the same problem.
If you are using mod_jk and have turned sticky sessions on, but your sessions are failing to stick, you have probably failed to set the domain, or you have failed to set the jvmRoute, or you are using a non-standard cookie name to implement the stickyness!
I think in your worker.properties file the workerlist should have loadBalancer worker not the node1,node2 & node3.It should be like this
worker.list=loadmanager
worker.loadmanager.balance_workers=node1,node2,node3
I hope u must have these correct.
Also you have to set UserJK arttribute to set as true for load balancing with sticky session combined with JvmRoute. If set to true, it will insert a JvmRouteFilter
to intercept every request and replace the JvmRoute if it detects a failover.
<attribute name="UseJK">true</attribute>
in deploy/jboss-web.deployer/META-INF/jboss-service.xml

Resources